<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <p id="text">hello world</p>

    <script>
        // var p = document.getElementById('text');
        // p.style.color = 'red';
        var a = 10;

        function foo(a){
            var b = 2;

            function bar(){
                console.log(4);
            }

            var c = 3;
        }
        foo(1);

        console.log(a, b, c);
    </script>
</body>
</html>